home *** CD-ROM | disk | FTP | other *** search
- class disney.rabbitRivalry.scroller.Scroller
- {
- var __world;
- var __scrollRate;
- var __panels;
- var loop;
- function Scroller(t_data)
- {
- this.__world = t_data.owner;
- this.__scrollRate = 400;
- this.__panels = [];
- }
- function addPanel(distance, asset)
- {
- this.__panels.push(new disney.rabbitRivalry.scroller.ScrollerPanel(this.__world,distance,asset));
- }
- function addSky(asset)
- {
- this.__panels.push(new disney.rabbitRivalry.scroller.ScrollerSky(this.__world,asset));
- }
- function render(camera, dt)
- {
- this.loop = this.__panels.length;
- while(this.loop--)
- {
- this.__panels[this.loop].render(camera,dt);
- }
- }
- function generate(camera)
- {
- this.loop = this.__panels.length;
- while(this.loop--)
- {
- this.__panels[this.loop].spawn(camera);
- }
- }
- function clear(t_viewport)
- {
- super.onErase(t_viewport);
- this.loop = this.__panels.length;
- while(this.loop--)
- {
- this.__panels[this.loop].clear();
- }
- }
- }
-